package com.voto.sunflower.activity.me;

import retrofit.RetrofitError;
import retrofit.client.Response;

import com.voto.sunflower.model.response.UpdateAvatarResponse;
import com.voto.sunflower.retrofit.NetworkHandler;

public class UpdateAvatarCallback extends NetworkHandler<UpdateAvatarResponse> {

	private UpdateAvatarListener mUpdateAvatarListener;

	@Override
	public void failure(RetrofitError arg0) {
		super.failure(arg0);
		mUpdateAvatarListener.failure(arg0);
	}

	@Override
	public void success(UpdateAvatarResponse arg0, Response arg1) {
		super.success(arg0, arg1);
		mUpdateAvatarListener.success(arg0, arg1);
	}
	
	
	public void setListener(UpdateAvatarListener updateAvatarListener){
		mUpdateAvatarListener = updateAvatarListener;
	}
	
	public interface UpdateAvatarListener {
		
		void failure(RetrofitError error);

		void success(UpdateAvatarResponse updateAvatarResponse,
				Response response);
	}
}
